  <#include "./pc/header.html">
   
  <style>
  .dragAble {
    position: relative;
    cursor:pointer;
  }
	 #main_scroll{
	     overflow: hidden;
	     background-size:100% 100%;
	     background-repeat:no-repeat;
	 	 background-image: linear-gradient(to right,rgba(0,0,0,0.5),rgba(255, 255, 255, 0.3) 10%,rgba(0, 0, 0, 0.41),rgba(255,255,255,0.3)90%,rgba(10, 10, 10, 0.5));
	 	 }
	 #main_img{
	    box-shadow: 0px 2px 0px #868686,0px 3px 0px rgba(255, 255, 255, 0.52),0px 8px 8px #000,0px -2px 0px #585858,0px -3px 0px rgba(255, 255, 255, 0.55),0px -8px 8px #000;
	 }
	 #null_pic{
	 
    line-height: 600px;
    text-align: center;
    color: #F7F7F7;
    vertical-align: middle;
    font-size: 80px;
    text-shadow: 0px 1px 0px #666, 0px 2px 0px #555, 0px 3px 0px #222, 0px 6px 1px rgba(0, 0, 0, 0.1), 0px 0px 5px rgba(0, 0, 0, 0.1), 0px 1px 3px rgba(0, 0, 0, 0.3), 0px 3px 5px rgba(0, 0, 0, 0.2), 0px 5px 10px rgba(0, 0, 0, 0.25), 0px 10px 10px rgba(0, 0, 0, 0.2), 0px 20px 20px rgba(0, 0, 0, 0.15);
	 
	 }
	 #null_desc{
	      padding: 10px; 
	    color: white;
	    font-size: 30px;
	 }
	 .time_tool{
        float: right;
	    height: 30px;
	    width: 460px;
	    line-height: 20px;
	   
	 }
	 .time_tool .btn{ width:30px;height:24px;  margin-top: 6px;}
	 .admin_false #fileUpload{display:none}
	 #datetimepicker{
		 background:rgba(0,0,0,0);
		 border:none;
	 }
	 
	   #small_area_more,.err_text{
         clear: both;
	    height: 30px;
	 
	    text-align: center;
	    line-height: 30px;
	    color: white;
	    cursor:pointer;
     }
     #show_inline{
     
     position: absolute; right: 0px;  
     }
     #tbtn{
	   width: 25px;
	    height: 18px;
	    line-height: 18px;
	    /* float: right; */
	    position: absolute;
	    top: 2px;
	    right: 10px;
	    color:white;
     }
     #picdesc{
      position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    background: rgba(85, 85, 85, 0.5);
    color: white;
    font-size: 18px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0px -3px 3px rgba(2, 2, 2, 0.8),0px 3px 3px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
     }
     #picdesc:empty{
       display:none;
     }
     .mor_pic_item #picdesc{
         white-space: nowrap!important;
          height: 28px;
     }
     #big_area #picdesc{
     height:auto;
      min-height: 28px;
      max-height:200px;
     overflow:auto;
     }
    .picTime .delete{
        float:right;display:inline;padding:0 5px;background:rgba(0,0,0,0.5);margin:3px;height:20px;line-height:20px;border-radius:2px;
        display:none;
     }
     
     .admin_true  .mor_pic_item.active .picTime .delete{
      display:block;
     }
     
     .picmode #weixin_runpic{
           display:block;  
     }
     .picmode #weixin_runvedio{
            display:none;
     }
      .videomode #weixin_runvedio{
        display:block;  
     }
     .videomode #weixin_runpic{
        display:none;
     }
     .img_content{
       overflow-x: hidden;
     }
     
  </style>
                <ul class="h_tool" id="toolBtn">
                <li class="h_t_item btn"   href="${s.base}/i/pcmain/${Session ["province"]!}"  id="weixin_map"><div > 设备布局 </div></li>
                <li class="h_t_item split"  > </li>
         
             	<li class="h_t_item btn active"    id="weixin_pic"><div  > 图片监控 </div></li>
             	<li class="h_t_item btn"    id="weixin_video"><div > 视频监控 </div></li>
             	<li class="h_t_item split"  > </li>
                <li class="h_t_item btn"    id="weixin_push"><div > 微信推送 </div></li>
                <li class="h_t_item btn"    id="weixin_runpic"><div > 图片抓取 </div></li>
                <li class="h_t_item btn"    id="weixin_runvedio" ><div > 视频抓取</div></li>
                <li class="h_t_item split  admin"  > </li>
                <li class="h_t_item btn  admin"   href="${s.base}/admin/index/${Session ["province"]!}"  id="weixin_admin"><div > 后台管理 </div></li>
             	
    
             </ul>  
             
		</div>
		<div class="mcontent">
		
			<#include   "./pc/leftnave.html">
			<!-- 右侧body区域 -->
			<div class="c_body  " >
 
					<div class="page_view">
					    <div class="ds_tool  colorable  shadow  ">
					    
					        <span class="title">
					        
					        </span>
					        <div class="time_tool">
					            <a class=" btn"  id="fileUpload1" href="javascript:void(0)"  title="视频矩阵"><i class="fa fa-film fa-lg"  ></i>  </a>
					            <a class=" btn"  id="fileUpload1" href="javascript:void(0)"  title="图片矩阵"><i class="fa fa-picture-o fa-lg"  ></i>  </a>
					                 
					            <a class=" btn"  id="fileUpload1" href="javascript:void(0)"  title="图片抓取" ><i class="fa fa-camera-retro fa-lg"  ></i> </a>
					            <a class=" btn"  id="fileUpload1" href="javascript:void(0)"  title="视频抓取"><i class="fa fa-video-camera fa-lg"  ></i> </a> 
					            
					            <a class=" btn"  id="fileUpload1" href="javascript:void(0)"  title="微信推送"><i class="fa fa-weixin fa-lg"  ></i>  </a>
					          
					               
					            <a class=" btn"  id="fileUpload" href="javascript:void(0)"  title="上传图片"><i class="fa fa-upload fa-lg"  ></i>  </a>
						        <a class=" btn"  id="timeSelect" href="javascript:void(0)"  title="开始时间"><i class="fa fa-calendar fa-lg"  ></i> </a>
	
								<input type="text"  style="width:100px" id="datetimepicker"    />
							</div>
						 
						</div>
						<div class="ds_view">
							
							 <div class="now_pic   "   id="big_area" >
							 
							    <div class="picTime" > <div id="main_time"></div> <a href="#" id="tbtn" class="btn">+T</a></div>
							    
							   <div  class="scroll"   id="main_scroll"   >
							      <div id="null_pic">东电科技</div>
					 
							    </div>
							    <p id="picdesc"  class="scroll" ></p>
							 </div>
 
							 <div  class="mor_pics  "  id="small_area1" >
							
									 
								 
									<!--  开始 -->
									 <div class="img_content   dcontent scroll"  onscroll="lazyLoadPic(this)">
										<!--    本标签使用的是freemarker -->
										 
										         <ul   id="small_area" >
												   
												     	
												 </ul>
												 
									 
										     
									  </div>
									 <!-- 结束 -->
							 </div>
						
						
					     </div>
					</div>
		 </div>
		 <!-- end c_body -->
		</div>
 
 
     	 	<script type="text/javascript" src="${s.base}/res/pc/js/jquery.mousewheel.min.js"></script>
	
       <script>
       var eleMenuOn =null;
     
		                $(function(){

		                	// 左上角功能切换
		                	$(".h_t_item").on(
		                			"click",
		                			function() {
		                				var _this=$(this);
		                				if(_this.hasClass("disabled"))
		                					showTipInfo({success:false,desc:"请不要频繁 !"});
		                				_this.addClass("disabled");
		                				toolEvent($(this));
		                				// 系统页功能切换
		                				if ($(this).attr("id").indexOf("weixin_push") > -1) {
		                					 $.pushDlg.show(function(data){
		                						 if(data=="cancel"){
		                							 _this.removeClass("disabled");
		                						 }else 
		                						   pushto(data);
		                						 });
		                					 
		                					function pushto(token) {
					                					var tar = $(".mor_pic_item.active");
					                					var 	_url="imglist"
					                					
					                					// 151038400596510844
					                			
					                			        var  _dom="img";
			                                            
					                					if ($("#weixin_video").hasClass("active")){
					                						  tar = $(".mor_video_item.active");
					                 
					                							_url="videolist"
					                							_dom="video"
					                					} 
					                					var _name = $(".ds_tool .title").html();
					                					var _time = tar.find(".picTime").html();
					                					
					                					//var _tdex=_time.indexOf("<");
					                					_time=_time.split('<')[0];
					                					var _src = $("#main_scroll").find(_dom).attr("src");
					                					
					                					var _puid = tar.attr("puid");
					                					var _tlong=tar.attr("tlong");
					                					var _url = CONETXT_PATH + "/mindex/"+$("body").attr("pro")+"?puid=" + _puid +"&type="+_url+"&tlong="+_tlong;
					                					if(_puid==undefined){
					                						
						                					 
					                						showTipInfo({success:false,desc:"没有选中设备图片/视频!"});
					                					 
					                						return;
					                					}
					                					$.ajax({
					                						type : "POST",
					                						url : CONETXT_PATH + "/push/"+$("body").attr("pro")+"/"+token,
					                						data : {
					                							name : _name,
					                							time : _time,
					                							src : _src,
					                							puid : _puid,
					                							url : _url,
					                							tlong:_tlong
					                						},
					                						success : function(msg) {
					                							
					                							showTipInfo(msg,false,function(){
					                						 
					                								_this.removeClass("disabled");
					                								});
					                							 
					                							
					                						},
					                						error:function(){
					                						     _this.removeClass("disabled");
					                						}
					                					});
		                					}
		                				}
		                				
		                				else if ($(this).attr("id").indexOf("weixin_runpic") > -1) {
		                					
		                					var tar=$(".level_2.active");
		                					if(tar.length>0){
		                			 
		                					$.getJSON(CONETXT_PATH+"/getpic/"+tar.attr("puid"), function(data){
		                						  
		                							showTipInfo(data,false,function(){
				                						 
		                								_this.removeClass("disabled");
		                								});
		                						});
		                					}else {
		                						showTipInfo({success:false,desc:"没有选中设备!"});
		                						_this.removeClass("disabled");
		                					}
		                				}
										else if ($(this).attr("id").indexOf("weixin_runvedio") > -1) {
											
		                					var tar=$(".level_2.active");
		                					if(tar.length>0){
		                			 
		                					$.getJSON(CONETXT_PATH+"/getvedio/"+tar.attr("puid"), function(data){
		                						  console.log(JSON.stringify(data))
		                							showTipInfo(data,false,function(){
				                						 
		                								_this.removeClass("disabled");
		                								});
		                						});
		                					}else {
		                						showTipInfo({success:false,desc:"没有选中设备!"});
		                						_this.removeClass("disabled");
		                					}
		                				}
		                				// 数据源切换
		                				else if ($(this).attr("id").indexOf("weixin_pic") > -1) {
		                					_this.removeClass("disabled");
		                				 
		                					$("#weixin_video").removeClass("active");
		                					$(this).addClass("active");
		                					
		                					loadLoadList($(".level_2.active"));
		                					$("body").removeClass("videomode").addClass("picmode");
		                					/* $("#weixin_runpic").show();
		                					$("#weixin_runvedio").hide(); */
		                					
		                				} else if ($(this).attr("id").indexOf("weixin_video") > -1) {
		                					_this.removeClass("disabled");
		                				 
		                					$("#weixin_pic").removeClass("active");
		                					$(this).addClass("active");
		                					loadLoadList($(".level_2.active"));
		                					$("body").removeClass("picmode").addClass("videomode");
		                				/* 	$("#weixin_runpic").hide();
		                					$("#weixin_runvedio").show(); */
		                				}
		                				
		                				else if ($(this).attr("id").indexOf("weixin_map") > -1) {
		                					location.href=$(this).attr("href");
		                				}
		                				
		                			});
		              
		                	//点击里列表图片在右侧显示大图
		                /* 	$("body").on(
		                			"click",
		                			".level_2>.name",
		                			function() {
		                				var _this = $(this).parent();
		                				$(".level_2.active").removeClass("active");
		                				_this.addClass("active");
		                				 

		                				$(".ds_tool .title").html($(this).html());

		                				loadLoadList(_this);	
		                				//======================ADD history
		                				  var query = this.href;//.split("?")[1];
										    if (history.pushState && query  ) {
										        
										        // history处理
										     //  var title = "上海3月开盘项目汇总-" + $(this).text().replace(/\d+$/, "");
										       title=  document.title ;
										        if (event && /\d/.test(event.button)) {            
										            history.pushState({ title: title }, title, query);
										        }
										    }
										    
		                				return false;
		                	});  */ 
		                	$("body").on("levelClick",function(e,tar){
		                	
		                	  loadLoadList(tar);	
		                	});
		                	
		                	
		                //////=========================
		  	        var fnHashTrigger = function(target) {
		      	    var query = location.href.split("?")[1], eleTarget = target || null;
		      	    if (typeof query == "undefined") {
		      	        if (eleTarget = $(".level_2>.name").get(0)) {
		      	            // 如果没有查询字符，则使用第一个导航元素的查询字符内容
		      	            history.replaceState(null, document.title, location.href.split("#")[0] + "?" + eleTarget.href.split("?")[1]) + location.hash;    
		      	            fnHashTrigger(eleTarget);
		      	        }
		      	    } else {
		      	        $(".level_2>.name").each(function() {
		      	            if (eleTarget === null && this.href.split("?")[1] === query) {
		      	                eleTarget = this;
		      	            }
		      	        });
		      	        
		      	        if (!eleTarget) {
		      	            // 如果查询序列没有对应的导航菜单，去除查询然后执行回调
		      	            history.replaceState(null, document.title, location.href.split("?")[0]);    
		      	            fnHashTrigger();
		      	        } else {
		      	            $(eleTarget).trigger("click");
		      	        }        
		      	    }    
		      	};
		      	if (history.pushState) {
		      	    window.addEventListener("popstate", function() {
		      	        fnHashTrigger();                             
		      	    });
		      	    
		      	    // 默认载入
		      	    fnHashTrigger();
		      	}
		      	//====================
		                	
		                	
		                	// 图像列表点击
		                	$("body").on("click", ".mor_pics .mor_video_item", function() {
		                	    var _this=$(this);
		                	   
		                		 $(".mor_pics .mor_video_item").removeClass("active");
		                		_this.addClass("active");
		                		var img = _this.find(".showicon");

		                		var src =   img.attr("data-original");
		                	 
		                		src=CONETXT_PATH +"/equip/video/"+src;
		                		$("#main_scroll").html('<video src="'+src+'" width="100%" height="100%" controls autoplay loop><source type=video/mp4 /> 你的浏览器不支持</video>');
		                		$("#picdesc").html("");
		                	});


		                	// 图像列表点击
		                	$("body").on("click", ".mor_pics .mor_pic_item", function() {

		                		loadBigPic($(this));
		                	});
		                	
		                	// // 树形结构菜单点击

		                	$("body").on("click", ".level_1 .span", function() {
		                		var _this = $(this).parent();
		                		if (_this.hasClass("active")) {
		                			_this.removeClass("active");
		                			return;
		                		}
		                		$(".level_1.active").removeClass("active");

		                		_this.addClass("active");
		                		if (_this.find(".item_content").html() == "") {
		                			_this.find(".item_content").load(_this.attr("tar"));
		                		}
		                	});

		                	function loadLoadList(tar){
		                		 var  _this=$(tar);
		       
		                		   var src = CONETXT_PATH + "/equip/imglist/" + _this.attr("puid")
		                					+ ".do";
		                		 
		                			if ($("#weixin_video").hasClass("active")) {
		                				var src = CONETXT_PATH + "/equip/videolist/"
		                						+ _this.attr("puid") + ".do";
		                			}
		                		 
		                			// $("#small_area").load(_this.attr("tar"), function() {
		                			$("#small_area").load(src, function() {
		                				//lazyLoadPic(".img_content");
		                				// alert($(".mor_pics div ul li:nth-child(1)").html())
		                				lazyLoadPic(".img_content");
		                				setTimeout(function(){
			                				var tar = $(".mor_pics div ul li:nth-child(1)");
			                				if (tar != undefined) {
			                					tar.addClass("active");
			                					loadBigPic(tar);
			                				}
		                				},200);
		                			    
		                			});
		                			
		                	}
		                	$.loadImgList=	loadLoadList;	
		                		//20160728 动态加载更多
		                  $("body").on("click","#small_area_more",function(){
		                			  var src = CONETXT_PATH + "/equip/imglist/" + $(".level_2.active").attr("puid")
	                					+ ".do";
	                				  var tlong=$(".mor_pics div ul li:last").attr("tlong");
	                				  
	                				 if ($("#weixin_video").hasClass("active")) {
			                				var src = CONETXT_PATH + "/equip/videolist/"
			                						+ $(".level_2.active").attr("puid") + ".do";
			                				tlong=$(".mor_pics div ul li:last").attr("tlong");
			                			}
		                			 $.ajax({
		                		            type:"GET",
		                		            url:src, 

		                		            data: "time="+tlong,
		                		            success:function(html){
		                		            	$("#small_area_more").replaceWith(html);
		                		            },
		                		            error:function(XMLHttpRequest, textStatus, thrownError){}
		                		        })
		                		});	 			
		                })
                       /**
                                                                        限定被缩放图片的位置，只能在容器内
                       */
		                function  fixedOffset(oDragObj){
		                		 //初始的时候，oDragObj 的高度可能为0 ，也就是还没加载图片的时候
		                		 
		                	   var objheight=oDragObj.offsetHeight;
		                	//初始的时候判断图片是否加载完，加载完成在执行该函数就不会出现0的可能了	 
		                	//   if(objheight==0)
		                	//		 objheight=oDragObj.parentNode.offsetHeight/1.694;
		                			
		            		 // window.log(oDragObj.parentNode.offsetHeight,objheight);
		            		//  window.log(oDragObj.parentNode.offsetHeight,objheight);
		            		  
		            		  var minTop=oDragObj.parentNode.offsetHeight-objheight;
		            		   
	            		      var minLeft=oDragObj.parentNode.offsetWidth-oDragObj.offsetWidth;
	            		      
	            		    //本身的宽度小于等于 容器的宽度 
	            		      if(oDragObj.offsetWidth<=oDragObj.parentNode.offsetWidth)
		                        oDragObj.style.left=0;
		                      else if(oDragObj.offsetLeft>0)
		                    	  oDragObj.style.left=0;
		                      else if(oDragObj.offsetLeft<minLeft)
		                    	  oDragObj.style.left=minLeft+"px";
	            		    
	            		     if(minTop>=0)
	            		    	oDragObj.style.top=minTop/2+"px"
	            		     else if(oDragObj.offsetTop>0)
	            		    	  oDragObj.style.top=0;
	            		     else if(oDragObj.offsetTop<minTop)
	            		    	 oDragObj.style.top=minTop+"px";
	            		     
	       /*      		     oDragObj.parentNode.scrollTop= -oDragObj.style.top;
	            		     oDragObj.parentNode.scrollLeft=-oDragObj.style.left;
	            	 		  window.log('scroll',oDragObj.parentNode.scrollTop,oDragObj.parentNode.scrollLeft); */
	            		     
	            	       }

								/**
								加载大图
								 */
								function loadBigPic(tar) {
									var _this = tar;
									// if(_this.hasClass("active")){
									// _this.removeClass("active");
									// return;
									// }
									$(".mor_pics .mor_pic_item").removeClass(
											"active");
									
									_this.addClass("active");
									
									var img = _this.find("img");
									if(img<1)
										return;

								//	var src = img
								//			.attr("data-original")
								//			|| img.attr("src");
								
								    var src_small = img.attr("src");
								    if(typeof(src_small)==undefined)
								    	return;
								    
									var src = src_small.replace("_small","");
									
								//	window.open(src, 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no') 
									// window.open (src,'newwindow','width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-30)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')
									
									 if($("#main_img").length<1){ 
										$("#main_scroll")
												.html(
														'<img id="main_img_small"  style="position:absolute" class="dragAble" src=" " > <img id="main_img"  class="dragAble" src=" " >');
									}
									
									$("#main_img,#main_img_small ")
									.attr("src",  "");
									$("#main_img_small").attr("src",src_small);
									
									 ///修改背景 
								 
									//$("#main_img").parent().css("background-image", "url("+src_small+") ");
									
									$("#main_img").css({width:"100%",height:"100%"})
									
											.attr("src", src );
									$("#picdesc").html(tar.find("#picdesc").html());
								
									var time = _this.find(".picTime");
									
									$("#main_time").html(time.html());
									
									var tar = $("#main_img")[0];
									
									
								// tar.style.visibility = 'hidden';
									
									document.getElementById('main_img').onload=function(){
									
										fixedOffset(tar);
								//		tar.style.visibility = 'visible';
									}

								}

								function gragPIC(container, imag) {

									// 滚轮实现图片放大缩小
									$('body')
											.on(
													'mousewheel',
													"#main_img",
													function(event) {
														var o = this;
												/* 		console
																.log(
																		event.deltaX,
																		event.deltaY,
																		event.deltaFactor); */
														var width = parseInt(
																o.style.width,
																10) || 100;
														width += event.deltaY * 10; //可适合修改
														if (width < 100)
															width = 100;
														if(width>300)
															width=300;
														o.style.width = width
																+ '%';
														o.style.height = width
														+ '%';
														fixedOffset(o);
														event.stopPropagation(); //终止冒泡的方法  
														return false;
													})

									//获取div的四个顶点坐标
									function getDivPosition() {
										var odiv = document
												.getElementById(container);
										//  alert(odiv.getBoundingClientRect().left);
										// alert(odiv.getBoundingClientRect().top);

										var xLeft, xRigh, yTop, yBottom;
										return {
											xLeft : odiv
													.getBoundingClientRect().left,
											xRigh : odiv
													.getBoundingClientRect().left + 130,
											yTop : odiv.getBoundingClientRect().top,
											yBottom : odiv
													.getBoundingClientRect().top + 130
										};
									}

									//获取鼠标坐标
									function mousePos(e) {
										var x, y;
										var e = e || window.event;
										return {
											x : e.clientX
													+ document.body.scrollLeft
													+ document.documentElement.scrollLeft,
											y : e.clientY
													+ document.body.scrollTop
													+ document.documentElement.scrollTop
										};
									}
									;

									//在固定div层拖动图片
									var ie = document.all;
									var nn6 = document.getElementById
											&& !document.all;
									var isdrag = false;
									var y, x;
									var oDragObj;

									//鼠标移动
									function moveMouse(e) {
										//鼠标的坐标
										mousePos(e).x;
										mousePos(e).y;
										//div的四个顶点坐标
										getDivPosition().xLeft
										getDivPosition().xRigh
										getDivPosition().yTop
										getDivPosition().yBottom

									 

										if (isdrag) {

											oDragObj.style.top = (nn6 ? nTY
													+ e.clientY - y : nTY
													+ event.clientY - y)
													+ "px";
											oDragObj.style.left = (nn6 ? nTX
													+ e.clientX - x : nTX
													+ event.clientX - x)
													+ "px";

											fixedOffset(oDragObj);
										}

										if (isdrag
												&& mousePos(e).x > getDivPosition().xLeft
												&& mousePos(e).x < getDivPosition().xRigh
												&& mousePos(e).y > getDivPosition().yTop
												&& mousePos(e).y < getDivPosition().yBottom) {

											return false;
										}
									}

									//鼠标按下才初始化
									function initDrag(e) {
										var oDragHandle = nn6 ? e.target
												: event.srcElement;
										var topElement = "HTML";
										while (oDragHandle.tagName != topElement
												&& oDragHandle.className != imag) {
											oDragHandle = nn6 ? oDragHandle.parentNode
													: oDragHandle.parentElement;
										}
										if (oDragHandle.className == imag) {
											isdrag = true;
											oDragObj = oDragHandle;
											//记录下 点击是于左上角的差值
											nTY = parseInt(oDragObj.style.top + 0);
											y = nn6 ? e.clientY : event.clientY;
											nTX = parseInt(oDragObj.style.left + 0);
											x = nn6 ? e.clientX : event.clientX;
											document.onmousemove = moveMouse;
											return false;
										}
									}
									document.onmousedown = initDrag;
									document.onmouseup = function() {
										isdrag = false
									};//new Function("isdrag=false");   

								}

								gragPIC("main_scroll", "dragAble");
							</script>
	     
    
	    <script type="text/javascript" src="${s.base}/res/js/lazyLoadPic.js"></script>
	 <#include "./pc/fileUpload.html"> 
	  <#include "./pc/aplicationSelect.html"> 
  <#include "./pc/flooder.html">
 
   <link rel="stylesheet" type="text/css" href="${s.base}/res/pc/css/jquery.datetimepicker.css"/>
   <script type="text/javascript" src="${s.base}/res/pc/js/jquery.datetimepicker.full.min.js"></script>

	
  <script type="text/javascript">
  $(function(){
	  
	    lazyLoadPic(".img_content");
	    var now=new Date();
	       //选定时间  加载第一屏 图片数据，查看更多，通过图片列表下面的加载更多。。。 。。。图片信息
	    $('#datetimepicker').datetimepicker({
	    	step:5,
	    	//inline:true, 
	    	locale:"ch",
	    	value:now ,
	    	onSelectTime: function (bs) {
	    		var src = CONETXT_PATH + "/equip/imglist/" + $(".level_2.active").attr("puid")
				+ ".do";
				
			 if ($("#weixin_video").hasClass("active")) {
    				  src = CONETXT_PATH + "/equip/videolist/"
    						+ $(".level_2.active").attr("puid") + ".do";
    			}
    			
			 $.ajax({
		            type:"POST",
		            url:src, 
		            dataType:'html',
		            data: "time="+bs.getTime(),
		            success:function(html){
		            	$("#small_area").html(html);
		            },
		            error:function(XMLHttpRequest, textStatus, thrownError){}
		        })
	    	}
	    //	defaultDate:now.format("yyyy-MM-dd"),  
	    //	defaultTime:now.format("hh:mm"),
	    
	    
	    
	    }); 
	    //弹出时间选择对话框
	    $("#timeSelect").on("click",function(){
	    	  $('#datetimepicker').datetimepicker("show");
	    });
	    
	    
	    //添加图片注释信息
	    $("#tbtn").on("click",function(e){
	    	  $("#inputDlg").slideDown();
	    	  return false;
	    })
	    //弹出文件上传选中对话框
	    $("#fileUpload").on("click",function(){
	  
		    if($(".level_2.active").length<1){
		    	  showTipInfo({success:false,desc:"没有选中设备!"});
		    }else{
		    	  $.fileDlg.show();
		    }
		    	
	    });
	    //删除图片
	    $("body").on("click",".picTime .delete",function(){ 
	    
	       
	    	var img =$(this).parent().parent().find("img").attr("alt");
	    	 $.ajax({
		            type:"POST",
		            url: CONETXT_PATH +"/file/delete",  
		            data: "filename="+img,
		            success:function(data){
		            	 showTipInfo(data,null,function(){
		            		 $.loadImgList($(".level_2.active"));
		            	 });   
		            },
		            error:function(XMLHttpRequest, textStatus, thrownError){}
		        })
	    });
	    
  
  })
  
	
 </script>